package com.cskaoyan._12io._01bytestream._02fileinputstream;

import java.io.FileInputStream;
import java.io.IOException;

/**
 * @author Macro_Ray
 * @since 2024/3/21 20:56
 */
// 字节输入流循环读取
public class FileInputStreamDemo2 {
    public static void main(String[] args) throws IOException {
        // 1.创建对象
        FileInputStream fis = new FileInputStream("Day17_Code//b.txt");
        // 2.循环读取
        int b;
        while ((b = fis.read()) != -1) {
            System.out.print((char) b);
        }

        /*while ((fis.read()) != -1) {
            System.out.print(fis.read());
        }*/


        // 3.释放资源
        fis.close();

    }
}
